package net.wanho.ums.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.ums.entity.Dept;
import net.wanho.ums.service.DeptService;
import net.wanho.ums.vo.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2023-12-20 16:28
 * Description：<描述>
 */
@RestController
@RequestMapping("/dept")
@RequiredArgsConstructor
public class DeptController {

    private final DeptService deptService;

    @GetMapping("/list")
    public AjaxResult list(){
        List<Dept> list = deptService.list();
        return AjaxResult.success(list);
    }

}
